package com.lenovo.lcdm.dcm.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lenovo.lcdm.dcm.dto.DcmLoadsheetDto;
import com.lenovo.lcdm.dcm.dto.DcmUploadResultDto;
import com.lenovo.lcdm.dcm.dto.DummyConfigurableModelDto;
import com.lenovo.lcdm.dcm.entity.DummyConfigurableModel;
import com.lenovo.lcdm.dcm.vo.DcmFullCvVo;
import com.lenovo.lcdm.dcm.vo.DcmHistoryVo;
import com.lenovo.lcdm.dcm.vo.DummyConfigurableModelVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Set;

public interface DcmService {
    DummyConfigurableModelVo checkout(Integer id);

    Long createDcm(DummyConfigurableModelDto dummyConfigurableModelDto);

    IPage<DummyConfigurableModelVo> getDcms(String keywords, Integer pageNo, Integer pageSize);

    void checkIn(DummyConfigurableModelDto dummyConfigurableModelDto);

    DummyConfigurableModelVo getDcmById(Integer id);

    void undoCheckout(String ids);

    List<DcmHistoryVo> getDcmHistoryById(Integer id);

    List<Long> publicDcmByIds(String ids);

    List<DcmUploadResultDto> uploadDcmLoadsheet(MultipartFile file) throws IOException;

    List<Long> refreshByIds(String ids);

    Long copyById(Integer id, String portfolioName, String geo);

    /**
     *
     * @param ids
     * @return
     */
    List<DcmLoadsheetDto> getDcmLoadsheetDtos(List<Long> ids);

    /**
     * 查找dcm列表，检查是否同一个GEO
     * @param ids
     * @return
     */
    List<DummyConfigurableModel> getDcmList(List<Long> ids);

    DummyConfigurableModelVo getLastVersionById(Integer id);

    List<DcmFullCvVo> getFullCvs(Integer id, String ctoNumber);

    /**
     * 示例
     */
    void testModel();

    Long createDcmInUI(String productName, String geo, String ctoNumbers);

    Set<String> getEditPermissionGeos();

    void removeDcmById(Integer id);
}
